<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black" />
    <meta name="format-detection" content="telephone=no, email=no" />
    <title>供灯</title>
    <script type="text/javascript" src="{MODULE_URL}public/deng/js/flexible.js"></script>
    <script type="text/javascript" src="{MODULE_URL}public/deng/js/pageLoading.js"></script>
    <link type="text/css" rel="stylesheet" href="{MODULE_URL}public/deng/css/index3.css">
</head>
<body>
<div class="bg">
    <!--二维码begin-->
    <div class="qrcode" id="qrcode" style="display:none;">
        <div class="imgBox">
            <img src="{MODULE_URL}public/deng/images/qrcode_new.png" alt="二维码">
        </div>
    </div>
    <!--二维码end-->
    <div class="music running">
        <audio src="http://baifo.b0.upaiyun.com/music/mercy.mp3" autoplay loop id="bgmusic"></audio>
    </div>
    <div class="musicSmall musicS1"></div>
    <div class="musicSmall musicS2"></div>
    <div class="musicSmall musicS3"></div>
    <div class="lightSnuff">
        <img src="{MODULE_URL}public/deng/images/ligth.png" />
    </div>
    <div class="snuffText"></div>
    <a href="{php echo $this->createMobileUrl('gongdeng2')}" class="lightBtn" ></a>
</div>
 {template 'baifocommon/nav'}
<script type="text/javascript" src="{MODULE_URL}public/deng/js/zepto.min.js"></script>
<script type="text/javascript">
    $(function(){
        $("ul.nav>li").on('tap', function(e){
            e.stopPropagation();
            var index = $(this).index();
            $(this).addClass('on').siblings().removeClass('on');
        });
        $(".dropA").on('tap',function(){
            //$('.dropdown').addClass('on');
            if (!$('.dropdown').hasClass('downOn')) {
                $('.dropdown').addClass('downOn');
            }else{
                $('.dropdown').removeClass('downOn');
            }
        })
        $(document).on('tap', function(e){
            var obj = e.target;
            if (!$(obj).is('.dropdown, .dropdown *')) {
                $('.dropdown').removeClass('downOn');
            }
        });

        $(".music").on('tap',function(){
            if(!$(this).hasClass('off')){
                $(this).addClass('off');
                $(this).removeClass('running');
                $('audio').get(0).pause();
                $('.musicSmall').hide();

            }else{
                $(this).removeClass('off');
                $(this).addClass('running');
                $('audio').get(0).play();
                $('.musicSmall').show();
            }
        });

    });

    function toChooseLight()
    {
        var isSubscribe = parseInt("");   //是否关注
        if(isSubscribe){
            location.href = "/index.php?g=Wap&m=Gongdeng&a=choose_light&token=yimjsw1467078121";
        }else{
            $('#qrcode').css('display','block');
        }
    }
</script>
</body>
</html>